package com.sptpc.qimoxiangmu.repository;

import com.sptpc.qimoxiangmu.model.Type;
import com.sptpc.qimoxiangmu.model.Model;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;
import java.util.Optional;

public interface ModelRepository extends JpaRepository<Model, Long> {
    List<Model> findAllByModel(Type type);
    Optional<Model> findByModel(String model);
    Page<Model> findAll(Pageable pageable);
}
